package ua.races.dom.analyzerDirector.decoratedAnalyzer;

import ua.races.dom.analyzerDirector.RaceDocumentAnalyzer;
import org.w3c.dom.Element;
import ua.races.vo.Race;
import ua.races.vo.Race;

import java.util.ArrayList;
import java.util.List;

public class DecoratedRaceDocumentAnalyzer extends RaceDocumentAnalyzer{

    private List<Race> races = new ArrayList<Race>();

    @Override
    public List<Race> getEntities() {
        return races;
    }

    @Override
    public void buildList(Element root) {
        super.buildList(root);
        races.addAll(entities);
    }
}
